package com.xuhuan.example.util;

/**
 * @author: huan.xu
 * @create: 2023/11/13 16:24
 * @description: 数组工具类
 **/
public class ExampleArrayUtils {

    /**
     * 打印二维数组
     *
     * @param array
     */
    public static void printArray(int[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i] + "\t");
        }
    }

    /**
     * 打印二维数组
     *
     * @param array
     */
    public static void printArray(String[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i] + "\t");
        }
    }

    /**
     * 打印二维数组
     *
     * @param array
     */
    public static void printArray(int[][] array) {
        for (int i = 0; i < array.length; i++) {
            for (int i1 = 0; i1 < array[i].length; i1++) {
                System.out.print(array[i][i1] + "\t");
            }
            System.out.println();
        }
    }
}
